﻿using System.Collections.Generic;
using System.Linq;
using AB.ServiceDirectory.Dao;
using AB.ServiceDirectory.Entities;

namespace AB.ServiceDirectory.BO
{
    public sealed class ServiceDetail2BO
    {
        private static readonly ServiceDetail2Dao Detail2Dao = new ServiceDetail2Dao();

        private ServiceDetail2BO()
        {
        }

        //public IQueryable<ServiceReferenceData> LoadCategorybyId(int id)
        //{          
        //    return Detail2Dao.LoadCategorybyId(id);
        //}

        public static IQueryable<Intervention> SelectInterventions(int serviceId)
        {
            return Detail2Dao.SelectInterventions(serviceId);
        }

        //public IQueryable<Program> SelectPrograms()
        //{
        //    return Detail2Dao.SelectPrograms();
        //}

        //public ServiceReference GetServiceById(int id)
        //{
        //    return Detail2Dao.GetServiceById(id);
        //}

        public static bool EditService2(Service service)
        {
            return Detail2Dao.EditService2(service);
        }

        public static bool AddService2(Service service)
        {
            return Detail2Dao.AddService2(service);
        }

        public static IQueryable<Service> GetOtherService(int serviceId)
        {
            return Detail2Dao.GetOtherService(serviceId);
        }

        public static bool EditIntervention(ICollection<Intervention> intervention)
        {
            return Detail2Dao.EditIntervention(intervention);
        }
    }
}